﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Furion.EventBus.RabbitMq
{
    public class Startup : AppStartup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddConfigurableOptions<RabbitMqOptions>();

            services.AddEventBus(builder =>
            {
                builder.ReplacePublisher<RabbitMqEventPublisher>();
                builder.ReplaceStorer(provider => provider.GetService<RabbitMqEventSourceStorer>());
            });
        }
    }
}
